package com.ehsy.service;

import com.dtflys.forest.annotation.*;
import com.dtflys.forest.callback.OnError;
import com.dtflys.forest.callback.OnProgress;
import com.dtflys.forest.callback.OnRedirection;
import com.dtflys.forest.callback.OnSuccess;
import com.dtflys.forest.http.ForestResponse;
import com.ehsy.common.ResponseVo;
import com.ehsy.model.UserInfo;
import org.springframework.stereotype.Component;

/**
 * @author YanZhen_Li
 * @version 1.0
 * @title CallbackService
 * @description
 * @create 2024/6/19 10:07
 */
@Component
@Address(host = "127.0.0.1", port = "8080")
public interface CallbackService {
    @Get("/test/code/{code}")
    String test01(@Var("code") Integer code, OnSuccess<String> onSuccess, OnError onError);

    @Get("/file/download/{fileName}")
    byte[] test02(@Var("fileName") String fileName, OnProgress onSuccess);

    @Get("https://www.baidu.com/s")
    ForestResponse<String> test3(@Query("wd") String wd, OnRedirection onRedirection);
}
